﻿using ErrorOr;
using Gnivc.CarDealership.Api.Application.Dtos;
using Gnivc.CarDealership.Api.Domain.Entities;

namespace Gnivc.CarDealership.Api.Application.Abstractions.Repositories;

public interface IVehicleRepository
{
    Task<ErrorOr<IEnumerable<VehicleDto>>> GetAvailablesAsync(
        DateTime dateTime, 
        Guid? brandId = null, 
        Guid? modelId = null);
    Task<ErrorOr<Vehicle?>> GetByIdAsync(Guid vehicleId);
    Task<ErrorOr<Created>> AddAsync(Vehicle vehicle);
    Task<ErrorOr<Updated>> UpdateAsync(Vehicle vehicle);
    Task<ErrorOr<Deleted>> DeleteAsync(Guid vehicleId);
}
